﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.SessionState;
using GWEB.WebBase.Entity;
using GWEB.WebBase.Utility;
using GWEB.WebFrame.Public;

namespace GWEB.WebFrame.Models
{
    public class GrantUser
    {
        public PageInfo Init()
        {
            PageInfo pg = new PageInfo();
            pg.Type = "GrantUser";
            pg.SMenuId = "CS02";
            HttpSessionState session = System.Web.HttpContext.Current.Session;
            pg.dict = BasePage.getDict(session);
            pg.Sop = BasePage.Grant(session, pg.SMenuId);
            pg.KeyFieldName = "id";
            pg.TableName = "tb_sys_users";
            pg.Sql = "select * from (select iuserid as id,susername,sshowname as name from tb_sys_users) tb_sys_role where 1=1 ";
            ColumnInfo cl;
            cl = new ColumnInfo(); cl.FieldName = "susername"; cl.HeadText = "用户名"; pg.AddColumn(cl);
            cl = new ColumnInfo(); cl.FieldName = "name"; cl.HeadText = "用户名称"; pg.AddColumn(cl);

            return pg;
        }
    }
}